package icu.zqyhdm.blog.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * @Description 文章的类型实体类
 * @Author lifu
 * @Date 2021/6/22 15:15
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("type")
@ApiModel(description = "文章文章")
public class Type implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "类型名")
    @NotBlank(message = "文章内容不能为空")
    @TableField(value = "type_name")
    private String typeName;

    @ApiModelProperty(value = "作者id")
    @TableField(value = "author_id")
    private Integer authorId;
}
